/**
 * author      : dormi330
 * date        : 2018/6/30
 * project     : mybatis
 * description : 应用运行上下文
 * 遇到过很多这样的场景, 与领域无关的东西, 渗透到领域模型里面去
 * 想通过某种方式解决这个问题,
 */

package com.deep.trade.application;

import org.springframework.stereotype.Service;

@Service
public class AppRuntimeEvn {

    ThreadLocal<String> tenantCode = new ThreadLocal<String>() {
        @Override
        protected String initialValue() {
            return null;
        }
    };


    ThreadLocal<Integer> pageNum = new ThreadLocal<Integer>() {
        @Override
        protected Integer initialValue() {
            return 1;
        }
    };


    ThreadLocal<Integer> pageSize = new ThreadLocal<Integer>() {
        @Override
        protected Integer initialValue() {
            return 10;
        }
    };
}
